<div class="path"><i class="iconfont">&#xf108;</i>  <a href="{url('admin/default/welcome')}">开始</a> / <a href="{url('module/index')}">模型管理</a> / <a href="{url('module/field',array(id=>$info['id']))}">{$info['name']}</a> / 字段列表</div>
<div class="m10">
<div class="table-head fn-clear">
    <div class="fn-l"><a href="{url('module/index')}" class="button"> <i class="iconfont">&#xf053;</i> 返回</a><strong>模型《{$info['name']}》字段列表</strong></div>
    <div class="fn-r"><a href="{url('module/fieldadd',array(id=>$info['id']))}" class="button button-blue"> <i class="iconfont" >&#xf055;</i> 增加字段</a></div>
</div>
<table class="table">
<thead><tr><th class="fn-tac w40">#</th><th class="fn-tac w100">字段类型</th><th class="fn-tac w150">字段名</th><th class="fn-tal">字段标识</th><th class="fn-tac w120">创建时间</th><th class="fn-tac w80">操作</th></tr></thead>
<tbody>
{loop $list $vo}
<tr>
    <td class="fn-tac"><input fid="{$vo['id']}" name="sorter" class="w40 h20 fn-tac" type="text" value="{$vo['neworder']}" /></td>
    <td class="fn-tac w100"><?php 
          switch($vo['type']) {
          case 1:        
                echo '单行文本';
                break;
          case 2:        
                echo '多行文本';
                break;
          case 3:        
                echo '编辑器';
                break;
          case 4:        
                echo '下拉列表';
                break;
          case 5:        
                echo '单选框';
                break;
          case 6:        
                echo '复选框';
                break;
          }
          ?></td>
    <td class="fn-tac w150">{$vo['fields']}</td>
    <td><a href="{url('module/fieldedit',array(id=>$vo['id']))}" title="编辑">{$vo['name']}</a></td>
    <td class="fn-tac">{date('Y-m-d H:i:s',$vo['uptime'])}</td>
    <td class="fn-tac tip"><a href="{url('module/fieldedit',array(mid=>$vo['mid'],id=>$vo['id']))}" title="编辑">编辑</a>/<a class="del" href="###" url="{url('module/field',array(id=>$vo['id'],act=>'del'))}"  title="删除">删除</a>
    </td>
</tr>
{/loop}
</tbody>
</table>
<div id="page" class="fn-clear">{$pager}</div>
</div>
<script language="javascript">
Do('base','dialog',function(){
    $("input[name='sorter']").blur(function(){
        var id = $(this).attr('fid');
        var sid = $(this).val();
        $.post('{url('module/uporter')}',{id:id,sorter:sid})
    });
    $('.del').click(function(){$(this).del();});
})
</script>